package woaini.wind.bot.code.impl.qq;

import woaini.wind.bot.code.impl.qq.adapter.QQBOTWsAdapter;
import woaini.wind.bot.code.impl.qq.config.QQBOTConfig;
import woaini.wind.bot.code.impl.qq.internal.QQBOTInternal;
import woaini.wind.bot.core.adapter.Adapter;
import woaini.wind.bot.core.bot.Bot;
import woaini.wind.bot.core.internal.Internal;

public class QQBOT extends Bot<QQBOTConfig> {

  public static final String NAME = "QQBOT";

  private Adapter sendAdapter;

  private Adapter receiveAdapter;

  public QQBOT(QQBOTConfig config) {
    super(config);
    init();
  }

  public void init() {
    QQBOTWsAdapter qqbotWsAdapter = new QQBOTWsAdapter(this);
    this.sendAdapter = qqbotWsAdapter;
    this.receiveAdapter = qqbotWsAdapter;
  }

  @Override
  public String agreement() {
    return QQBOT.NAME;
  }

  @Override
  public void close() {}

  @Override
  public Adapter receiveAdapter() {
    return receiveAdapter;
  }

  @Override
  public Adapter sendAdapter() {
    return sendAdapter;
  }

  @Override
  public Internal internal() {
    return new QQBOTInternal(this);
  }
}
